package com.example.teesystem.entity.vo.classStudent;

import com.example.teesystem.common.utils.FileUtil;
import com.example.teesystem.entity.User;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;


@Data
@NoArgsConstructor
@AllArgsConstructor
public class ClassStudentResponseVo {
    /**
     * id主键自增
     */
    private Integer id;
    
    /**
     * 账户名
     */
    private String account;
    
    
    /**
     * 姓名
     */
    private String myName;
    
    /**
     * 用户名
     */
    private String username;
    
    /**
     * 账户状态
     */
    private Integer accountType;

    private String url;

    public ClassStudentResponseVo(User user){
        BeanUtils.copyProperties(user,this);
        this.url = FileUtil.FILE_PREFIX+user.getAvatarUrl();
    }
}
